import com.Connect;
import com.config.GameConfig;

private function config():void{
	GameConfig.instance.addEventListener(Event.COMPLETE,gameConfigCompletedHandler);
	GameConfig.instance.init();
}
private function gameConfigCompletedHandler(event:Event):void
{
	customContextMenu();
	trace("init game config");
	Connect.connect();
	new RpgFacade();
}

private function customContextMenu():void {
	
	var version:String="版本号: "+GameConfig.instance.version;
	
	var cm:ContextMenu=new ContextMenu;
	var item:ContextMenuItem=new ContextMenuItem(version);
	cm.hideBuiltInItems();
	cm.customItems.push(item);
	item = new ContextMenuItem("日期: "+GameConfig.instance.date);
	cm.customItems.push(item);
	item = new ContextMenuItem("公司: "+GameConfig.instance.company);
	cm.customItems.push(item);
	this.contextMenu=cm;
}